#!/bin/bash
# Installs and configures dirac with default Belle settings.

#path to install dirac in - if you change the configuration!
wget http://svnweb.cern.ch/guest/dirac/DIRAC/trunk/DIRAC/Core/scripts/dirac-install.py -O dirac-install.py
wget http://dirac-grid.googlecode.com/svn/BelleDIRAC/trunk/BelleDIRAC/Core/scripts/besdirac01-client.cfg -O besdirac01-client.cfg
python dirac-install.py besdirac01-client.cfg
source bashrc
dirac-proxy-init
dirac-configure besdirac01-client.cfg
echo "#####################################################################################"
echo "now, setup a cron to periodically update the certificates. eg run crontab -e and add"
echo "0 7 * * * $PWD/pro/scripts/dirac-admin-get-CAs"
echo "to the file opened to update them daily at 7:00AM"
echo "#####################################################################################"
